metier
Class Equipe

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by metier.Equipe
All Implemented Interfaces:
java.io.Serializable, java.rmi.Remote, EquipeInterface

public class Equipe
extends java.rmi.server.UnicastRemoteObject
implements EquipeInterface

Class Equipe Package metier Définition d'une Equipe

Author:
Hervé Le Fouler et Lionel Lasry
See Also:
Serialized Form

Field Summary
private  int goalaverage
           
private  int id
           
private  int IdChampionnat
           
private  java.lang.String nom
           
private  int points
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
Equipe()
          Constructeur de Equipe
Equipe(int id_equipe)
          Deprecated. Remplacé par findEquipe(int id_equipe)
Equipe(int idChampionnat, java.lang.String nom)
          Constructeur de Championnat
 
Method Summary
 boolean createEquipe(int IdChampionnat, java.lang.String nom)
          Insére une équipe dans la base si elle n'existe pas déjà
 com.mysql.jdbc.ResultSet findAllEquipes(int id_championnat)
          Cherche l'ensemble des équipes enregistrées dans un championnat
 void findEquipe(java.lang.String nameEquipe)
          Récupére tout les informations d'une équipe à partir de son nom et instancie l'objet avec ses valeurs
 void findEquipeById(int idEquipe)
          Constructeur de Equipe à partir de son id Récupére tout les informations d'une équipe à partir de son id et instancie l'objet avec ses valeurs
 int getGoalaverage()
          Renvoit le goalaverage actuel d'une équipe
 int getId()
          Renvoit l'id d'une équipe
 java.lang.String getNom()
          Renvoit le nom d'une equipe
 int getPoints()
          Renvoit le nombre de points actuels d'une équipe
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

nom

private java.lang.String nom

IdChampionnat

private int IdChampionnat

id

private int id

points

private int points

goalaverage

private int goalaverage
Constructor Detail

Equipe

public Equipe()
       throws java.rmi.RemoteException
Constructeur de Equipe

Throws:
java.rmi.RemoteException

Equipe

public Equipe(int idChampionnat,
              java.lang.String nom)
       throws java.rmi.RemoteException
Constructeur de Championnat

Parameters:
int - idChampionnat le numero id du championnat
String - nom de l'équipe
Throws:
java.rmi.RemoteException

Equipe

public Equipe(int id_equipe)
       throws java.rmi.RemoteException
Deprecated. Remplacé par findEquipe(int id_equipe)

Constructeur de Equipe à partir de son id Récupére tout les informations d'une équipe à partir de son id et instancie l'objet avec ses valeurs

Parameters:
int - id_equipe
Throws:
java.rmi.RemoteException
Method Detail

getPoints

public int getPoints()
              throws java.rmi.RemoteException
Renvoit le nombre de points actuels d'une équipe

Specified by:
getPoints in interface EquipeInterface
Returns:
int points
Throws:
java.rmi.RemoteException

getGoalaverage

public int getGoalaverage()
                   throws java.rmi.RemoteException
Renvoit le goalaverage actuel d'une équipe

Specified by:
getGoalaverage in interface EquipeInterface
Returns:
int points
Throws:
java.rmi.RemoteException

createEquipe

public boolean createEquipe(int IdChampionnat,
                            java.lang.String nom)
                     throws java.rmi.RemoteException
Insére une équipe dans la base si elle n'existe pas déjà

Specified by:
createEquipe in interface EquipeInterface
Parameters:
int - idChampionnat le numero id du championnat
String - nom de l'équipe
Returns:
boolean : true si l'insertion a été faite, false si l'équipe existe déjà
Throws:
java.rmi.RemoteException

findEquipe

public void findEquipe(java.lang.String nameEquipe)
                throws java.rmi.RemoteException
Récupére tout les informations d'une équipe à partir de son nom et instancie l'objet avec ses valeurs

Specified by:
findEquipe in interface EquipeInterface
Parameters:
String - nameEquipe : nom de l'équipe
Throws:
java.rmi.RemoteException

findEquipeById

public void findEquipeById(int idEquipe)
                    throws java.rmi.RemoteException
Constructeur de Equipe à partir de son id Récupére tout les informations d'une équipe à partir de son id et instancie l'objet avec ses valeurs

Specified by:
findEquipeById in interface EquipeInterface
Parameters:
int - idEquipe l'id de l'équipe
Throws:
java.rmi.RemoteException

findAllEquipes

public com.mysql.jdbc.ResultSet findAllEquipes(int id_championnat)
Cherche l'ensemble des équipes enregistrées dans un championnat

Parameters:
int - id_championnat l'id du championnat dont on cherche les équipes
Returns:
ResultSet un resultSet contenant toutes les équipes

getNom

public java.lang.String getNom()
                        throws java.rmi.RemoteException
Renvoit le nom d'une equipe

Specified by:
getNom in interface EquipeInterface
Returns:
String nom
Throws:
java.rmi.RemoteException

getId

public int getId()
          throws java.rmi.RemoteException
Renvoit l'id d'une équipe

Specified by:
getId in interface EquipeInterface
Returns:
int id
Throws:
java.rmi.RemoteException